import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
//sass

//5.在入口的index.js中导入stroe
import store from './store/storeIndex'

const root = ReactDOM.createRoot(document.getElementById('root'));

root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);

//6.监听状态管理器，全局数据发生变化直接重新渲染
store.subscribe(() => {  //订阅状态管理器
  root.render(
      <App />
  );
})
